# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm
from selenium import webdriver
from selenium.webdriver.common.by import By

url = 'https://www.douban.com/'
driver = webdriver.Edge()

driver.get(url)

iframe = driver.find_element(By.XPATH,'//*[@id="anony-reg-new"]/div/div[1]/iframe')

driver.switch_to.frame(iframe)

driver.find_element(By.XPATH,'/html/body/div[1]/div[1]/ul[1]/li[2]').click()

driver.find_element(By.XPATH,'//*[@id="username"]').send_keys('18127686385')
driver.find_element(By.XPATH,'//*[@id="password"]').send_keys('HeFeng4310262005')
driver.find_element(By.XPATH,'/html/body/div[1]/div[2]/div[1]/div[5]/a').click()

input()
driver.quit()